import unittest
import test02
import test


class TestRun(unittest.TestCase):
    def setUp(self):
        self.run_main1 = test.Runmain()

    def test_01(self):
        url = 'http://127.0.0.1:5000/query'

        data = {
            "id": 11,
            "password": "201901020124",
            "username": "谭繁荣（改）",
        }

        self.run_main1.send_post(url, data)


if __name__ == '__main__':
    # 实例化TestSuite创建测试套件
    suite = unittest.TestSuite
    # 把用例test_01添加到测试套件中
    suite.addTest(TestRun('test_01'))
